home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr27 / ifits00.zip / ITEST.BAT < prev   
DOS Batch File  |  1994-07-08  |  944b  |  58 lines

  1. @echo off
  2. cls
  3. echo ... ITEST ... IFITS testing in progress
  4. echo.
  5.  
  6. goto overscript
  7. ┌──────
  8. │Dos' "undocumented" test for parameters.
  9. │All examples test for batch command arguments
  10. ├──────
  11. │   if "%1" == "" goto error
  12. │or
  13. │   if '%1==' goto error
  14. │or
  15. │   if %2. == . goto errors
  16. │   if %1. == . goto error
  17. │or
  18. │   IF %1! == ! GOTO ERROR
  19. │   IF %2! == ! GOTO ERROR
  20. │or
  21. │   if "%1" == "needcash" goto work
  22. └──────
  23. :overscript
  24.  
  25. if "%1" == "ifits" goto school
  26. if %1. == . echo FIRST PARM is missing
  27. if "%1" == "" goto needaparm
  28. if %2! == ! goto need2parms
  29.  
  30. IFITS -T%1 +T%2 /E1
  31. if errorlevel 1 goto showmsg
  32. goto out
  33.  
  34. :showmsg
  35. echo.
  36. echo E1 caught .. executing command now..
  37. goto out
  38.  
  39. :need2parms
  40. echo.
  41. echo 2nd Parm need on command line.
  42. echo.
  43. goto out
  44.  
  45. :needaparm
  46. echo.
  47. echo Parm needed on command line.
  48. echo.
  49. goto out
  50.  
  51. :school
  52. echo.
  53. echo tsk tsk .. you know better!
  54. echo.
  55. goto out
  56. :out
  57. echo.
  58.